<h1 class="page-header">
    <small>订单列表</small>
</h1>
<hr/>
<div class="panel panel-inverse" data-sortable-id="form-stuff-5">
    <div class="panel-heading">
        <h4 class="panel-title">订单查询</h4>
    </div>
    <div class="panel-body">
        <form id="orderForm" name="orderForm" method="post" class="form-inline">
            <div class="form-group m-r-10">
                <input type="text" class="form-control" name="EQ_userId" value="${EQ_userId}"
                       placeholder="会员ID">
            </div>
            <div class="form-group m-r-10">
                <input type="text" class="form-control" name="EQ_orderSn" value="${EQ_orderSn}"
                       placeholder="订单号">
            </div>
            <div class="form-group m-r-10">
                <select class="form-control" name="EQ_type" id="EQ_type">
                    <option value="">类型</option>
                    <#if typeList?has_content && typeList?exists>
                    <#list typeList as pf>
                    <option value="${pf.key}" <#if params.EQ_type== pf.key> selected</#if>>${pf.value}</option>
                    </#list>
                    </#if>
                </select>
            </div>
            <button type="button" class="btn btn-sm btn-success"
                    onclick="postDataByForm('backend/order/list','displayArea','orderForm')"><i class="fa fa-search"></i>查询
            </button>
            <button type="reset" class="btn btn-danger btn-sm">
                <i class="fa fa-remove"></i>
                重置
            </button>
        </form>
    </div>
</div>
<hr/>
<div class="panel panel-inverse" data-sortable-id="table-basic-4">
    <div class="panel-heading">
        <h4 class="panel-title">订单列表</h4>
    </div>
    <div class="panel-body">
        <table class="table table-striped table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>会员手机</th>
                <th>订单号</th>
                <th>类型</th>
                <th>金额</th>
                <th>优惠金额</th>
                <th>创建时间</th>
                <th>更新时间</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <#if paginationResponse?has_content && paginationResponse.content?exists && paginationResponse.content?size gt 0>
                <#list paginationResponse.content as ct>
                    <tr>
                        <td>${ct.id}</td>
                        <td>${ct.mobile}</td>
                        <td>${ct.orderSn}</td>
                        <td>${ct.typeName}</td>
                        <td>${ct.amount}</td>
                        <td><#if ct.discount>${ct.discount}<#else>0.00</#if></td>
                        <td>${ct.createTime}</td>
                        <td>${ct.updateTime}</td>
                        <td>
                        <#if ct.status == "A">
                            有效
                        <#else>
                            无效
                        </#if>
                        </td>
                        <td>
                            <a class="label label-success small-btn" href="javascript:getData('${rc.contextPath}/backend/order/detail/${ct.id}','displayArea');" title="查看详情"><i class="fa fa-eye"></i>详情</a>
                        </td>
                    </tr>
                </#list>
            <#else>
            <tr class="gradeA even" role="row">
                <td colspan="12" class="text-center">没有符合条件的数据！</td>
            </tr>
            </#if>
        </table>
    </div>
</div>

<!-- 分页组件 -->
<!-- recordBean 分页查询结果Bean
     action 分页请求URL
     formName 分页需要的查询参数的表单名称 -->
<@sp.pagination recordBean=paginationResponse action="${rc.contextPath}/backend/order/list" formName="orderForm"/>